# REPLICATION ARCHIVE

This replication archive contains all scripts and data necessary to replicate the analysis in "Does Reason-Giving Affect Political Attitudes?".

## File Structure

replication/
├── code/
│   ├── 000_master.sh                   # Main shell script to run all analyses
│   ├── 00_prep_survey.R                # Prepares survey data for analysis
│   ├── 01_analysis_constraint.R        # Analysis script for constraint
│   ├── 02_analysis_polarization.R      # Analysis script for polarization
│   ├── 03_analysis_stability.R         # Analysis script for stability
│   ├── 04_analysis_ideology.R          # Analysis script for ideology
│   ├── 05_analysis_treatment_strength.R # Analysis script for treatment strength
│   ├── 06_heterogeneous_effects.R      # Script for heterogeneous effects analysis
│   └── fightin_words.R                 # Script for text analysis
├── data/
│   ├── treatments.csv                  # Contains details on treatment conditions
│   ├── survey_targets.xlsx             # Target sample demographics for survey
│   ├── incompletes.sav                 # Contains incomplete survey responses
│   └── new_survey/
│       ├── OP18397 UCL - Political research.sav         # Survey data, Wave 1
│       └── OP18397 UCL - Political research - WAVE 2.sav # Survey data, Wave 2
├── paper/
│   ├── manuscript.Rmd            # Source file for paper submission
│   ├── justification.bib               # Bibliography file for references
│   └── images/
│       ├── justification_prompt.png    # Image for justification prompt
│       └── policy_prompt.png           # Image for policy prompt
├── working/
│   └── survey.Rdata                    # Pre-processed survey data for analysis
└── README.txt                          # This file

## Instructions for Replication

Run `000_master.sh` to sequentially execute each analysis script in the appropriate order, or run individual scripts as needed. You will first need to adapt the first line of that file to point to the path of the replication archive on your machine.

## SOFTWARE

- R version 4.3.2 (2023-10-31)- Platform: aarch64-apple-darwin20 (64-bit)- Running under: macOS Sonoma 14.5

### R packages

tidyverse: 2.0.0broom: 1.0.5haven: 2.5.3polycor: 0.8.1wCorr: 1.9.8quanteda: 3.3.1quanteda.textplots: 0.94.3glmnet: 4.1.8quanteda.textstats: 0.96.4ggcorrplot: 0.1.4.1tidymodels: 1.2.0scales: 1.3.0ggrepel: 0.9.4survey: 4.2.1
